<!doctype HTML public "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- Click to Convert 5.2: Anything to HTML -->
<!-- http://www.clicktoconvert.com -->

<html>
<head>
<title>gravityboxscheduleuserguide - page 58 of 234</title>
<meta http-equiv=content-type content=text/html;charset=iso-8859-1>
<meta name="Generator" content="Click to Convert">

<!--Start of page styles-->
<STYLE TYPE="text/css">
<!--
 /* Foreground Image Styles */

 /* Position Styles */
 .ts58p0{position:absolute;left:106px;top:97px;}
 .ts58p1{position:absolute;left:352px;top:97px;}
 .ts58p3{position:absolute;left:672px;top:97px;}
 .ts58p7{position:absolute;left:106px;top:113px;}
 .ts58p8{position:absolute;left:706px;top:1026px;}
 .ts58p9{position:absolute;left:331px;top:1044px;}
 .ts58p13{position:absolute;left:106px;top:146px;}
 .ts58p14{position:absolute;left:106px;top:164px;}
 .ts58p16{position:absolute;left:106px;top:183px;}
 .ts58p17{position:absolute;left:106px;top:201px;}
 .ts58p18{position:absolute;left:106px;top:220px;}
 .ts58p21{position:absolute;left:106px;top:238px;}
 .ts58p22{position:absolute;left:106px;top:256px;}
 .ts58p23{position:absolute;left:106px;top:275px;}
 .ts58p24{position:absolute;left:106px;top:293px;}
 .ts58p26{position:absolute;left:106px;top:312px;}
 .ts58p27{position:absolute;left:106px;top:330px;}
 .ts58p29{position:absolute;left:106px;top:348px;}
 .ts58p30{position:absolute;left:106px;top:368px;}
 .ts58p32{position:absolute;left:106px;top:386px;}
 .ts58p34{position:absolute;left:106px;top:405px;}
 .ts58p36{position:absolute;left:106px;top:423px;}
 .ts58p38{position:absolute;left:106px;top:442px;}
 .ts58p39{position:absolute;left:106px;top:460px;}
 .ts58p41{position:absolute;left:106px;top:479px;}
 .ts58p42{position:absolute;left:106px;top:497px;}
 .ts58p43{position:absolute;left:106px;top:515px;}
 .ts58p45{position:absolute;left:106px;top:534px;}
 .ts58p47{position:absolute;left:106px;top:552px;}
 .ts58p48{position:absolute;left:106px;top:570px;}
 .ts58p49{position:absolute;left:106px;top:589px;}
 .ts58p50{position:absolute;left:106px;top:607px;}
 .ts58p53{position:absolute;left:106px;top:626px;}
 .ts58p54{position:absolute;left:106px;top:645px;}
 .ts58p56{position:absolute;left:106px;top:663px;}
 .ts58p58{position:absolute;left:106px;top:682px;}
 .ts58p60{position:absolute;left:106px;top:700px;}
 .ts58p62{position:absolute;left:106px;top:719px;}
 .ts58p64{position:absolute;left:106px;top:737px;}
 .ts58p66{position:absolute;left:106px;top:755px;}
 .ts58p68{position:absolute;left:106px;top:774px;}
 .ts58p69{position:absolute;left:106px;top:793px;}
 .ts58p71{position:absolute;left:106px;top:811px;}
 .ts58p72{position:absolute;left:106px;top:829px;}
 .ts58p73{position:absolute;left:106px;top:848px;}
 .ts58p77{position:absolute;left:106px;top:866px;}
 .ts58p78{position:absolute;left:106px;top:885px;}
 .ts58p80{position:absolute;left:106px;top:921px;}
 .ts58p81{position:absolute;left:106px;top:940px;}
 .ts58p82{position:absolute;left:106px;top:958px;}
 .ts58p84{position:absolute;left:106px;top:977px;}

 /* Font Styles */
 .ft0p58{font-style:normal;font-weight:bold;font-size:13px;font-family:arial,sans-serif;color:#000000;}
 .ft1p58{font-weight:normal;}
 .ft2p58{font-style:normal;font-weight:normal;font-size:13px;font-family:"times new roman","times new roman",times,serif;color:#000000;}
 .ft3p58{font-style:normal;font-weight:normal;font-size:16px;font-family:"times new roman","times new roman",times,serif;color:#000000;}
 .ft4p58{font-style:normal;font-weight:bold;font-size:11px;font-family:arial,sans-serif;color:#000000;}
 .ft5p58{font-style:normal;font-weight:normal;font-size:16px;font-family:arial,sans-serif;color:#000000;}
 .ft6p58{font-style:normal;font-weight:bold;font-size:21px;font-family:arial,sans-serif;color:#808080;}

 /* Background Style */
 .styleBackground58{position:absolute;left:97px;top:366px}

 /* Navigation Styles */
 .styleNavBarTop{position:absolute;left:0px;top:2px}
 .nb{position:absolute;left:2px;top:0px}
 .nbs{position:absolute;left:0px;top:0px}
 .nbe{position:absolute;left:836px;top:0px}
 .styleNavBarBot{position:absolute;left:0px;top:1117px}
-->
</STYLE>
<!--End of page styles-->

</head>
<body bgcolor="#ffffff" text="#000000" link="#0000FF" Vlink="#660099">

<table id="pageTable" width="836" STYLE="position: relative; left: auto; top: auto;"><tr><td>
<div class=nbs><img src="./navbarstart.gif" width="2" height="30"></div>
<div class=nb><img src="./navbar.gif" width="836" height="30" alt="Navigation bar"></div>
<div class=nbe><img src="./navbarend.gif" width="2" height="30"></div>
<div class=styleNavBarTop>
<table width="834" height="26" border="0" cellspacing="0">
  <tr align="left">
    <td width="4">&nbsp;</td>
    <td width="25" align="center"><a href="http://www.gravitybox.com" target="_parent"><img src="./home.gif" border="0" alt="Home"></a></td>
    <td width="25" align="center"><a href="#" onClick="window.open('./print.html','Printing','width=300,height=100,toolbar=no,directories=no');return false;"><img src="./print.gif" border="0" alt="Print document"></a></td>
    <td width="10" align="center"><img src="./separator.gif" border="0"></td>
    <td width="18" align="center"><a href="./index1.html"><img src="./start.gif" width="18" height="14" border="0" alt="Start"></a></td>
    <td width="18" align="center"><a href="./index57.html"><img src="./back.gif" width="14" height="14" border="0" alt="Previous page"></a></td>
    <td width="80" valign="middle"><table width="100%" height="16" border="0" cellspacing="1" bgcolor="#ACA899"><tr><td align="center" bgcolor="#ffffff"><font face=verdana,arial,sans-serif><font size="1">&nbsp;58 of 234&nbsp;</font></font></td></tr></table></td>
    <td width="18" align="center"><a href="./index59.html"><img src="./forward.gif" width="14" height="14" border="0" alt="Next page"></a></td>
    <td width="18" align="center"><a href="./index234.html"><img src="./end.gif" width="18" height="14" border="0" alt="End"></a></td>
    <td width="620">&nbsp;</td>
  </tr>
</table>
<p>
</div>
<nobr>
<div class=styleBackground58><img src="./background58.png" width="633" height="689" border="0" alt=""></div>
<div class=ts58p0><span class="ft0p58"> </span></div>
<div class=ts58p1><span class="ft0p58">Gravitybox Schedule Primer<span class="ft1p58"> </span></span></div>
<div class=ts58p3><span class="ft0p58">Page 56&nbsp; </span></div>
<div class=ts58p7><span class="ft2p58"> </span></div>
<div class=ts58p8><span class="ft3p58"> </span></div>
<div class=ts58p9><span class="ft4p58">1998&#45;2004 Gravitybox Software LLC<span class="ft3p58"> </span></span></div>
<div class=ts58p13><span class="ft5p58">The &#147;RoomId&#148; field will create a unique key by which each room may be identified. The </span></div>
<div class=ts58p14><span class="ft5p58">&#147;Name&#148; field is the text that is displayed for a room on the schedule. Finally the </span></div>
<div class=ts58p16><span class="ft5p58">&#147;SortOrder&#148; field allows the user to control the order in which the rooms are displayed. </span></div>
<div class=ts58p17><span class="ft5p58">After adding a room the user may set the order in which each appears The table </span></div>
<div class=ts58p18><span class="ft5p58">structure, though simple, will serve our needed purpose of storing room configurations. </span></div>
<div class=ts58p21><span class="ft5p58"> </span></div>
<div class=ts58p22><span class="ft5p58">The other configuration table is the &#147;Category&#148; table. Each appointment may have an </span></div>
<div class=ts58p23><span class="ft5p58">associated category. This will appear as a colored bar in its left margin. This aids the </span></div>
<div class=ts58p24><span class="ft5p58">user in summarizing information about an appointment without having to look at a detail </span></div>
<div class=ts58p26><span class="ft5p58">screen. A category is nothing more than a name and a color. The table definition may </span></div>
<div class=ts58p27><span class="ft5p58">be defined as follows. </span></div>
<div class=ts58p29><span class="ft5p58"> </span></div>
<div class=ts58p30><span class="ft5p58">CategoryId&nbsp; AutoNumber </span></div>
<div class=ts58p32><span class="ft5p58">Name&nbsp; String </span></div>
<div class=ts58p34><span class="ft5p58">Color&nbsp; Long Integer </span></div>
<div class=ts58p36><span class="ft5p58">SortOrder&nbsp; Long Integer </span></div>
<div class=ts58p38><span class="ft5p58"> </span></div>
<div class=ts58p39><span class="ft5p58">The table is similar to the &#147;Room&#148; table with the addition of the &#147;Color&#148; field. This field is </span></div>
<div class=ts58p41><span class="ft5p58">used to store the numeric value of a color. This is the color of the category bars drawn </span></div>
<div class=ts58p42><span class="ft5p58">on the schedule to visually represents the category. This other fields serve the same </span></div>
<div class=ts58p43><span class="ft5p58">purposes as they do in the &#147;Room&#148; table, to provider a unique key, display name, and </span></div>
<div class=ts58p45><span class="ft5p58">order. </span></div>
<div class=ts58p47><span class="ft5p58"> </span></div>
<div class=ts58p48><span class="ft5p58">Finally the main table is named &#147;Schedule&#148;. This table will store all of the necessary </span></div>
<div class=ts58p49><span class="ft5p58">information for an appointment. The following fields define an appointment: Date, </span></div>
<div class=ts58p50><span class="ft5p58">StartTime, Length, Description, Room, and Category. </span></div>
<div class=ts58p53><span class="ft5p58"> </span></div>
<div class=ts58p54><span class="ft5p58">ScheduleId&nbsp; AutoNumber </span></div>
<div class=ts58p56><span class="ft5p58">StartDate&nbsp; Date </span></div>
<div class=ts58p58><span class="ft5p58">StartTime&nbsp; Time </span></div>
<div class=ts58p60><span class="ft5p58">Length&nbsp; Long Integer </span></div>
<div class=ts58p62><span class="ft5p58">Description&nbsp; String </span></div>
<div class=ts58p64><span class="ft5p58">RoomId&nbsp; Long Integer </span></div>
<div class=ts58p66><span class="ft5p58">CategoryId&nbsp; Long Integer </span></div>
<div class=ts58p68><span class="ft5p58"> </span></div>
<div class=ts58p69><span class="ft5p58">The &#147;ScheduleId&#148; field will create a unique key for this appointment. The &#147;RoomId&#148; </span></div>
<div class=ts58p71><span class="ft5p58">property is a pointer to the &#147;Room&#148; table. This will be a reference to some record in that </span></div>
<div class=ts58p72><span class="ft5p58">table. The &#147;CategoryId&#148; field does much the same. It references some record in the </span></div>
<div class=ts58p73><span class="ft5p58">&#147;Category&#148; table. The other properties are self&#45;explanatory. </span></div>
<div class=ts58p77><span class="ft5p58"> </span></div>
<div class=ts58p78><span class="ft6p58">Loading Appointments </span></div>
<div class=ts58p80><span class="ft5p58">Now that the table structure is defined, we will build the code that accesses those tables </span></div>
<div class=ts58p81><span class="ft5p58">to load the schedule. After the user chooses a date to load, it is handed to a routine that </span></div>
<div class=ts58p82><span class="ft5p58">will open the database and retrieve the appropriate records. On the MDI child form the </span></div>
<div class=ts58p84><span class="ft5p58">&#147;LoadSchedule&#148; performs this action. </span></div>
<div class=styleNavBarBot>
<table width="836" border="0" cellspacing="2">
  <tr></tr>
  <tr>
    <td width="118"><a href="http://www.purepage.com"><img src="./smalllogo.gif" width="118" height="46" border="0" alt="http://www.purepage.com"></a></td>
    <td></td>
  </tr>
</table>
</div>

</td></tr></table>

</body>
</html>
